/* This goes in header */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Lora:wght@700&family=Chivo:wght@400;500;600&display=swap');

/* Design tokens */
:root {
  --font-hero: 'Fredoka One', cursive;
  --font-heading: 'Lora', serif;
  --font-body: 'Chivo', sans-serif;
  
  --content-max-width: min(65ch, 100vw - 3rem);

  --fs-hero: 4.75rem; /* 76px */
  --fs-h1: 3.8rem;   /* 61px */
  --fs-h2: 3.06rem;  /* 49px */
  --fs-h3: 2.44rem;  /* 39px */
  --fs-h4: 1.85rem;  /* 30px */
  --fs-lg: 1.25rem;  /* 20px */
  --fs-base: 1rem;   /* 16px */
  --fs-sm: 0.875rem; /* 14px */
  --fs-xs: 0.75rem;  /* 12px */
  
  --gray: #fff;
}

/* Balancing */
h1, h2, h3, h4, .hero {
  text-wrap: pretty;
}

p {
  max-width: var(--content-max-width);
  text-align: left;
  hyphens: auto;
  word-break: break-word;
  margin-bottom: 1em;
  color: rgb(48 0 15);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: var(--gray);
}

em {
  font-style: italic;
}

/* Headings */
.hero {
  font-family: var(--font-hero);
  font-size: var(--fs-hero);
  line-height: 1.05;
}

h1 {
  font-family: var(--font-hero);
  font-size: var(--fs-h1);
  line-height: 1.1;
}

h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.2;
}

h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.25;
}

h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: 500;
  line-height: 1.3;
}

/* Body */
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
}

.text-large {
  font-size: var(--fs-lg);
}

.text-small {
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.caption {
  font-size: var(--fs-xs);
  line-height: 1.5;
  opacity: 0.8;
  font-style: italic;
  color: rgb(48 0 15);
}

/* Buttons */
.button {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: none;
}

.button-small {
  font-size: var(--fs-sm);
}

/* For phones */
@media (max-width: 768px) {
  :root {
    --fs-hero: 3rem;      /* 48px */
    --fs-h1: 2.5rem;     /* 40px */
    --fs-h2: 2rem;       /* 32px */
    --fs-h3: 1.625rem;   /* 26px */
    --fs-h4: 1.375rem;   /* 22px */
    --fs-lg: 1.125rem;   /* 18px */
    --fs-base: 1rem;    /* 16px */
    --fs-sm: 0.875rem;  /* 14px */
    --fs-xs: 0.75rem;   /* 12px */
  }
}
